package com.dianping.cat.alarm.rule.entity;

import com.dianping.cat.alarm.rule.BaseEntity;
import com.dianping.cat.alarm.rule.IVisitor;
import java.util.ArrayList;
import java.util.List;

public class Condition
  extends BaseEntity<Condition> {
/*  10 */   private Integer m_minute = Integer.valueOf(3);

/*  12 */   private List<SubCondition> m_subConditions = new ArrayList();

  private String m_title;

/*  16 */   private String m_alertType = "error";






/*  23 */   public void accept(IVisitor visitor) { visitor.visitCondition(this); }


  public Condition addSubCondition(SubCondition subCondition) {
/*  27 */     this.m_subConditions.add(subCondition);
/*  28 */     return this;
  }


  public boolean equals(Object obj) {
/*  33 */     if (obj instanceof Condition) {
/*  34 */       Condition _o = (Condition)obj;

      if (!equals(getMinute(), _o.getMinute())) {
/*  37 */         return false;
      }

/*  40 */       if (!equals(getSubConditions(), _o.getSubConditions())) {
/*  41 */         return false;
      }

/*  44 */       if (!equals(getTitle(), _o.getTitle())) {
/*  45 */         return false;
      }

/*  48 */       if (!equals(getAlertType(), _o.getAlertType())) {
/*  49 */         return false;
      }


/*  53 */       return true;
    }

/*  56 */     return false;
  }


/*  60 */   public String getAlertType() { return this.m_alertType; }



/*  64 */   public Integer getMinute() { return this.m_minute; }



/*  68 */   public List<SubCondition> getSubConditions() { return this.m_subConditions; }



/*  72 */   public String getTitle() { return this.m_title; }






  public void mergeAttributes(Condition other) {
/*  92 */     if (other.getMinute() != null) {
/*  93 */       this.m_minute = other.getMinute();
    }

/*  96 */     if (other.getTitle() != null) {
/*  97 */       this.m_title = other.getTitle();
    }

/* 100 */     if (other.getAlertType() != null) {
/* 101 */       this.m_alertType = other.getAlertType();
    }
  }

  public Condition setAlertType(String alertType) {
/* 106 */     this.m_alertType = alertType;
/* 107 */     return this;
  }

  public Condition setMinute(Integer minute) {
/* 111 */     this.m_minute = minute;
/* 112 */     return this;
  }

  public Condition setTitle(String title) {
/* 116 */     this.m_title = title;
/* 117 */     return this;
  }
}


/* Location:              /Users/hanfei/Documents/apache-tomcat-9.0.24/webapps/cat/WEB-INF/lib/cat-alarm-3.0.0.jar!/com/dianping/cat/alarm/rule/entity/Condition.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       1.0.7
 */